package com.cskaoyan.controller;

import com.cskaoyan.bean.MarketSearchHistory;
import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.service.AdminHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yi
 * @date 2022/10/13 18:40
 */
@RestController
@RequestMapping("admin/history")
public class AdminHistoryController {
    @Autowired
    AdminHistoryService adminHistoryService;

    @RequestMapping("list")
    public BaseRespVo list(Integer userId, String keyword, BasePageInfo basePageInfo) {
        CommonData<MarketSearchHistory> data = adminHistoryService.queryHistory(userId, keyword, basePageInfo);
        return BaseRespVo.ok(data);
    }
}
